#将我爱python写入文件a.txt,然后在读取打印出来
file=open('a.txt','r')
for item in file:
    print(item)
file.close()

with open('a.txt','r') as file1:
    print(file1.read())